package ops

import (
	log "github.com/sirupsen/logrus"
	"net/http"
	"strings"
)

func Put(w http.ResponseWriter, req *http.Request) {
	objName := strings.Split(req.URL.EscapedPath(), "/")[2]
	c, e := storeObject(req.Body, objName)
	if e != nil {
		log.Debug(e)
		w.Write([]byte(e.Error()))
	}
	w.WriteHeader(c)
}
